package com.quinn.myDemo.testforcode;

import com.taobao.api.ApiException;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.request.AlibabaAlihealthDrugKytListpartsRequest;
import com.taobao.api.request.AlibabaAlihealthDrugKytSinglerelationRequest;
import com.taobao.api.response.AlibabaAlihealthDrugKytListpartsResponse;
import com.taobao.api.response.AlibabaAlihealthDrugKytSinglerelationResponse;

/**
 * kytListparts
 *
 * @author HanQuinn
 * Date: 2024/9/24
 * Time: 18:06
 */
public class kytListparts {
    public static void main(String[] args) {
        try {
            TaobaoClient client = new DefaultTaobaoClient("http://gw.api.taobao.com/router/rest", "34695618", "37ade9e9219e9dc86bf58d2e1c5282b9");
            AlibabaAlihealthDrugKytListpartsRequest req = new AlibabaAlihealthDrugKytListpartsRequest();
            req.setRefEntId("eddba00125164822823e6484c35d5d93");
            req.setPageSize(1000L);
            for (int i = 1; i < 9; i++) {
                req.setPage((long) i);
                AlibabaAlihealthDrugKytListpartsResponse rsp = client.execute(req);
                System.out.println(rsp.getRequestUrl());
            }
        } catch (ApiException e) {
            System.out.println(e.getSubErrMsg());
        }
    }
}















